package com.example.lotterysystem.service.enums;

import com.example.lotterysystem.controller.UserController;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum UserIdentifyEnum {
    ADMIN("管理员"),
    NORMAL("普通用户");

    private final String message;

    public static UserIdentifyEnum forName(String name){
        for(UserIdentifyEnum userIdentifyEnum : UserIdentifyEnum.values()){
            if(userIdentifyEnum.name().equalsIgnoreCase(name)){
                return userIdentifyEnum;
            }
        }
        return null;
    }
}
